package com.air.designmodel.nine;

/**
 * @author shent
 */
public class RemoteLoader {
    public static void main(String[] args) {
        RemoteControl remoteControl = new RemoteControl();

        Light kitchenLight = new Light("Kitchen");
        LightOnCommand kitchenLightOn = new LightOnCommand(kitchenLight);
        LightOffCommand kitchenLightOff = new LightOffCommand(kitchenLight);
        Light bedroomLight = new Light("Bedroom");
        LightOnCommand bedLightOn = new LightOnCommand(bedroomLight);
        LightOffCommand bedLightOff = new LightOffCommand(bedroomLight);

        remoteControl.setCommand(0, kitchenLightOn, kitchenLightOff);
        remoteControl.setCommand(1, bedLightOn, bedLightOff);

        remoteControl.onButtonWasPressed(0);
        remoteControl.onButtonWasPressed(1);
        remoteControl.offButtonWasPressed(0);
        remoteControl.offButtonWasPressed(1);
        remoteControl.offButtonWasPressed(3);

    }
}
